//
//  CouponsController.m
//  HaoHaiSpell
//
//  Created by 郭健 on 16/6/21.
//  Copyright © 2016年 海城. All rights reserved.
//

#import "CouponsController.h"
<<<<<<< HEAD

@interface CouponsController ()
=======
#import "LXSegmentScrollView.h"
@interface CouponsController ()<UITableViewDataSource,UITableViewDelegate>
>>>>>>> 5bee59541ff07dbcbaa6fe419e6df24b39c5e23d

@end

@implementation CouponsController

- (void)viewDidLoad {
<<<<<<< HEAD
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
}

=======
    
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.title = @"我的团";
    
    [self setUpColumnControl];
}


-(void)setUpColumnControl{
    //iOS7新增属性
    self.automaticallyAdjustsScrollViewInsets=NO;
    
    NSMutableArray *array=[NSMutableArray array];
    for (int i =0; i<3; i++) {
        UIView *view=[[UIView alloc] init];
        if (i==0) {
            view.backgroundColor=[UIColor whiteColor];
//            UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 100, 50)];
//            label.text = @"测试";
//            [view addSubview:label];
            
            UITextField *serialNumber = [[UITextField alloc]initWithFrame:CGRectMake(0, 0, kWidth, 40)];
            serialNumber.borderStyle = UITextBorderStyleBezel;
            serialNumber.placeholder = @"优惠券序列号";
            [view addSubview:serialNumber];
            
            UIButton *bindBtn = [UIButton buttonWithType:UIButtonTypeCustom];
            bindBtn.frame = CGRectMake(0, 40, kWidth, 40);
            bindBtn.backgroundColor = [UIColor redColor];
            [bindBtn setTitle:@"绑定优惠券" forState:UIControlStateNormal];
            [view addSubview:bindBtn];
            
            
        }if (i==1) {
            view.backgroundColor=[UIColor whiteColor];
        }if (i==2) {
            view.backgroundColor=[UIColor whiteColor];
        }
        [array addObject:view];
    }
    
    UITableView *tbale=[[UITableView alloc] init];
    tbale.delegate=self;
    tbale.dataSource=self;
    tbale.rowHeight=100;
    
    [array addObject:tbale];
    
    LXSegmentScrollView *scView=[[LXSegmentScrollView alloc] initWithFrame:CGRectMake(0, 64, self.view.bounds.size.width, self.view.bounds.size.height-64) titleArray:@[@"优惠券",@"未激活",@"已过期"] contentViewArray:array];
    [self.view addSubview:scView];
    
}

#pragma mark -- TableView的代理方法
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *cellid=@"cell";
    UITableViewCell *cell =[tableView dequeueReusableCellWithIdentifier:cellid];
    if (!cell) {
        cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellid];
    }
    cell.textLabel.text=@"数据";
    
    return cell;
    
}









>>>>>>> 5bee59541ff07dbcbaa6fe419e6df24b39c5e23d
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
